package main

import (
	"fmt"
	"github.com/e421083458/golang_common/lib"
	"os"
	"os/signal"
	"syscall"
	"tino_manager/router"
)

// @title 接囗文档
// @version 1.0
// @description 上链项目
// @termsofservice https://github.com/xxxx
// @contact.name Tracy
// @contact.email xxxx@126.com
// @securityDefinitions.apikey  ApiKeyAuth
// @in                          header
// @name                        Authorization
func main() {
	err := lib.InitModule("./conf/dev/", []string{"base", "mysql", "redis"})
	if err != nil {
		fmt.Println(err)
	}

	defer lib.Destroy()
	router.HttpServerRun()

	quit := make(chan os.Signal)
	signal.Notify(quit, syscall.SIGKILL, syscall.SIGQUIT, syscall.SIGINT, syscall.SIGTERM)
	<-quit

	router.HttpServerStop()
}
